home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-08 | 111.7 KB | 4,394 lines |
- '******************************************************************
- '* *
- '* TurboCAD for Windows *
- '* Copyright (c) 1993 - 1996 *
- '* International Microcomputer Software, Inc. *
- '* (IMSI) *
- '* All rights reserved. *
- '* *
- '******************************************************************
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- ' '
- ' TCWAPI40.H - Header file for Enable '
- ' '
- ' This file was created at 17:13:37 on 04/07/97, '
- ' by filter.exe, a program written by Pat Garner. '
- ' '
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
- 'Section
- 'APPLICATION - Miscellaneous Functions
-
- 'Description
- 'This function will shutdown the application and exit. All open drawings
- 'will be closed before exiting. If any drawings have been changed, you will
- 'be prompted to save them before exiting.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- ' None
- '
- 'See Also
- '
- 'Coding Example
- ' TCWAppExit
- '
- 'Declaration
- Declare Function TCWAppExit lib "TCAPI40" ()
-
- 'Description
- 'This function will return the active window handle. The active window is
- 'the currently active drawing window.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'The handle of window as a long.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hWindow As Long
- ' hWindow = TCWActiveWindow()
- ' ...
- '
- 'Declaration
- Declare Function TCWActiveWindow lib "TCAPI40" () As Long
-
- 'Description
- 'This function will launch an Enable Basic statement (passed as a String)
- 'or load and execute an Enable basic file (if the string ends with ".bas").
- '
- 'Input Parameters
- 'String script A statement in Enable Basic or the name of an Enable Basic file
- '
- 'Return Value
- 'None
- '
- 'See Also
- 'TCWBasicDebug
- '
- 'Coding Example
- ' TCWBasicRun "MsgBox" + Chr(34) + "Hello World!" + Chr(34)
- ' TCWBasicRun "test.bas"
- '
- 'Declaration
- Declare Function TCWBasicRun lib "TCAPI40" ( _
- ByRef script As String _
- ) As Long
-
- 'Description
- 'This function will launch the Enable debugger with an Enable Basic statement
- '(passed as a String) or load an Enable basic file (if the string ends with ".bas") into
- 'the debugger.
- '
- 'Input Parameters
- 'String script A statement in Enable Basic or the name of an Enable Basic file
- '
- 'Return Value
- ' None
- '
- 'See Also
- ' TCWBasicRun
- '
- 'Coding Example
- ' TCWBasicDebug "MsgBox" + Chr(34) + "Hello World!" + Chr(34)
- ' TCWBasicDebug "test.bas"
- '
- 'Declaration
- Declare Function TCWBasicDebug lib "DEBUGGER40" ( _
- ByRef s As String _
- )
-
- 'Section
- 'APPLICATION - Error Functions
-
- 'Description
- 'This function will return a string for the last error that occurred in the script.
- '
- 'The script is responsible for checking for errors after making TCADAPI calls.
- 'If the API call was supposed to return a handle to drawing, graphic, ...
- 'you should check for NULL and call TCWLastErrorGet if true. If a non-null handle
- 'was returned, then the call succeeded and you don't need to check for errors.
- 'For Api calls that return status, 0 signifies success. Non-zero status signifies failure
- 'and you should call TCWLastErrorGet to get the error text.
- '
- 'Input Parameters
- 'String errorstring Buffer to return error string in
- '
- 'Return Value
- 'Error string in string passed to the function. Function returns 0 is successful and non-zero if
- 'their was no error to retrieve.
- '
- 'See Also
- 'TCWClearError
- '
- 'Coding Example
- ' Dim result As Long
- ' Dim errtext As String
- ' Dim gCircle As Long
- ' ...
- ' gCircle = TCWCircleCenterAndPoint(xc, yc, zc, xp, yp, zp)
- ' if (gCircle = NULL) then
- ' result = TCWLastErrorGet (errtext)
- ' MsgBox errtext
- ' 'Terminate the program
- ' Stop
- ' end if
- ' ...
- '
- 'Declaration
- Declare Function TCWLastErrorGet lib "TCAPI40" ( _
- ByRef pszErrorString As String _
- ) As Long
-
- 'Description
- 'This function will clear the error info in TCADAPI. You can use this function after
- 'you've checked the previous TCADAPI function status. TCADAPI will clear
- 'the error information structure at the beginning of each API function so previous
- 'errors will be lost if you don't use TCWLastErrorGet.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'None
- '
- 'See Also
- '
- 'Coding Example
- ' ...
- ' TCWClearError
- '
- 'Declaration
- Declare Function TCWClearError lib "TCAPI40" ()
-
- 'Section
- 'APPLICATION - Get and Set Property Functions
-
- 'Description
- 'This function will return the value of the property that has been
- 'requested. This function is written in Basic due to problems with Enable
- 'not supporting Variants with DLLs.
- '
- 'Input Parameters
- 'String propertyname name of property look up
- '
- 'AVAILABLE PROPERTIES: DESCRIPTION:
- '"ColorButtons" buttons are color or black and white
- '"EditBar" viewing of the EditBar
- '"LargeButtons" buttons are large or small
- '"Organization" organization name
- '"OpenReadOnly" open files as read only
- '"PromptForSummaryInfo" prompting for summary information on save
- '"Rulers" viewing of Rulers
- '"ScrollBars" viewing of Scroll Bars
- '"StatusBar" viewing of Status Bar
- '"ShowTooltips" show tool tips
- '"SaveDesktopOnExit" save desktop settings on exit
- '"UserName" username
- '"ZoomFactor" what factor to zoom when zooming in/out
- '
- 'Return Value
- 'Value of property requested.
- '
- 'AVAILABLE PROPERTIES: VALUE RETURNED:
- '"ColorButtons" -1 if color buttons set, 0 if not set
- '"EditBar" -1 if displayed, 0 if not displayed
- '"LargeButtons" -1 large buttons is set, 0 if not set
- '"Organization" organization name as a string
- '"OpenReadOnly" -1 if set, 0 if not set
- '"PromptForSummaryInfo" -1 if set, 0 if not set
- '"Rulers" -1 if displayed, 0 if not displayed
- '"ScrollBars" -1 if displayed, 0 if not displayed
- '"StatusBar" -1 if displayed, 0 if not displayed
- '"ShowTooltips" -1 if displayed, 0 if not displayed
- '"SaveDesktopOnExit" -1 if set, 0 if not set
- '"UserName" username as a string
- '"ZoomFactor" the zoom factor as a double
- '
- 'See Also
- 'TCWAppPropertySet
- '
- 'Coding Example
- '
- ' zoomValue = TCWAppPropertyGet("ZoomFactor")
- '
- 'Declaration
- 'Declare Function TCWAppPropertyGet ( _
- ' ByRef propertyname As String _
- ')As Variant
-
- 'Description
- 'This function will set the property with the specified value.
- '
- 'Input parameters
- 'String propertyname name of property to modify
- 'Variant value value to set to
- '
- 'AVAILABLE PROPERTIES: VALUE:
- '"ColorButtons" 1 if color, 0 if black and white (Integer)
- '"EditBar" 1 if displayed, 0 if not displayed (Integer)
- '"LargeButtons" 1 if large buttons, 0 if small (Integer)
- '"Organization" organization name (String)
- '"OpenReadOnly" 1 if read only, 0 if not (Integer)
- '"PromptForSummaryInfo" 1 if prompt, 0 if no prompt (Integer)
- '"Rulers" 1 if displayed, 0 if not (Integer)
- '"ScrollBars" 1 if displayed, 0 if not (Integer)
- '"StatusBar" 1 if displayed, 0 if not (Integer)
- '"ShowTooltips" 1 if show tips, 0 if not (Integer)
- '"SaveDesktopOnExit" 1 if save on exit, 0 if not (Integer)
- '"UserName" username (String)
- '"ZoomFactor" zoom factor (Double)
- '
- 'Return Value
- ' 0 if no errors
- ' non-zero if errors, use TCWLastErrorGet to retrieve error string
- '
- 'See Also
- ' TCWAppPropertyGet
- '
- 'Coding Example
- '
- ' result = TCWAppPropertySet("ZoomFactor",10.0)
- '
- 'Declaration
- 'Declare Function TCWAppPropertySet ( _
- ' ByRef propertyname As String, _
- ' ByVal value As Variant _
- ')As Long
-
- 'Section
- 'APPLICATION - Drawing Management Functions
-
- 'Description
- 'This function will create a new TurboCAD drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'The handle to the new drawing as a long. If return value is NULL, then the
- 'drawing was not created. Use TCWLastErrorGet to retrieve the error string.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hDrawing As Long
- ' hDrawing = TCWDrawingNew()
- ' if (hDrawing = NULL) then
- ' 'check error
- ' ...
- ' end if
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingNew lib "TCAPI40" () As Long
-
- 'Description
- 'This function will open a drawing in any TurboCAD supported format. The format
- 'is based on the file extension (.tcw, .dxf, .dwg...).
- '
- 'Input Parameters
- 'String drawingname name of drawing to open
- '
- 'Return Value
- 'The handle to the opened drawing as a long. If return value is NULL, then the
- 'drawing was not opened. Use TCWLastErrorGet to retrieve the error string.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hDrawing As Long
- ' hDrawing = TCWDrawingOpen("c:\mydrawings\pipes.tcw")
- ' if (hDrawing = NULL) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingOpen lib "TCAPI40" ( _
- ByRef dname As String _
- ) As Long
-
- 'Description
- 'This function will close the current drawing. If the file has changed since
- 'it was last saved, the value of savechanges will determine if the file is saved
- 'first before closing.
- '
- 'Input Parameters
- 'Long savechanges 1 if save changes before closing, 0 to not save changes
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- ' ...
- ' result = TCWDrawingClose(1)
- ' if (result <> 0) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingClose lib "TCAPI40" ( _
- ByVal savechanges As Long _
- ) As Long
-
- 'Description
- 'This function will save the current drawing to disk using the file and folder
- 'name that was previously used. If this is the first time the file has been
- 'saved, you will be prompted with the SaveAs dialog, prompting you for a name
- 'and location to save the file. If you have Prompt for Summary Info in the
- 'Options|Program Setup|General property sheet selected, you will be prompted to
- 'input summary information.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWDrawingSaveAs
- '
- 'Coding Example
- ' ...
- ' result = TCWDrawingSave()
- ' if (result <> 0)
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingSave lib "TCAPI40" () As Long
-
- 'Description
- ' This function will save the current drawing to disk using a file name and folder
- ' you specify. The SaveAs dialog box will be displayed and you can input name,
- ' location, etc. If you have Prompt for Summary Info in the
- ' Options|Program Setup|General property sheet selected, you will be prompted to
- ' input summary information. Set saveselection to True if you only want to save
- ' the current selection to the file.
- '
- 'Input Parameters
- 'String drawingname new name of drawing
- 'Integer saveselection True if you want to save selection, false for drawing
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWDrawingSave
- '
- 'Coding Example
- ' ...
- ' result = TCWDrawingSaveAs("newdrawing.tcw")
- ' if (result <> 0) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingSaveAs lib "TCAPI40" ( _
- ByRef dname As String, _
- ByVal saveselection As Long _
- ) As Long
-
- 'Description
- 'This function will return the name of the drawing associated with the active
- 'drawing. If the drawing is a new drawing that has not been saved, this function
- 'will return the drawing title (e.g. Drawing1). This function can be used with TCWDrawingAt and TCWDrawingCount.
- 'If you have only one drawing open, you can use TCWDrawingName(name) and it will
- 'return the name of the current drawing. If you have multiple drawings open,
- 'use TCWDrawingCount to find out how many are open, then use TCWDrawingAt and TCWDrawingName
- 'to cycle through the drawings to get the name of each.
- '
- 'Input Parameters
- 'String drawingname buffer for drawing name
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWDrawingCount, TCWDrawingAt
- '
- 'Coding Example
- ' Dim dCount As Long
- ' Dim hDrawing As Long
- ' Dim i As Long
- ' Dim dName As String
- ' dCount = TCWDrawingCount()
- ' if (dCount = 0) then
- ' MsgBox "No drawings open."
- ' Stop
- ' end if
- ' for i = 0 to dCount - 1
- ' hDrawing = TCWDrawingAt(i)
- ' TCWDrawingName dName
- ' MsgBox dName
- ' next i
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingName lib "TCAPI40" ( _
- ByRef dname As String _
- ) As Long
-
- 'Description
- 'This function will activate the drawing specified. This function is used
- 'with TCWDrawingCount to get the number of drawings open in the application.
- 'If you have multiple drawings open, you can use TCWDrawingCount to get the
- 'number of drawings, then use TCWDrawingAt to change the active drawing. The
- 'index is 0 based, so you can cycle through 0 to count-1 drawings.
- '
- 'Input Parameters
- 'Long index number associated with the open drawing
- '
- 'Return Value
- 'The handle to the drawing as a long.
- '
- 'See Also
- 'TCWDrawingName, TCWDrawingCount
- '
- 'Coding Example
- ' Dim dCount As Long
- ' Dim i As Long
- ' Dim hDrawing As Long
- ' dCount = TCWDrawingCount()
- ' for i = 0 to dCount - 1
- ' hDrawing = TCWDrawingAt(i)
- ' ...
- ' next i
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingAt lib "TCAPI40" ( _
- ByVal index As Long _
- ) As Long
-
- 'Description
- 'This function will return the number of open drawings. Used with
- 'TCWDrawingName and TCWDrawingAt to cycle through the open drawings.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Number of open drawings in TurboCAD as a long.
- '
- 'See Also
- 'TCWDrawingName, TCWDrawingAt
- '
- 'Coding Example
- ' Dim dCount As Long
- ' Dim i As Long
- ' Dim hDrawing As Long
- ' dCount = TCWDrawingCount()
- ' for i = 0 to dCount - 1
- ' hDrawing = TCWDrawingAt(i)
- ' ...
- ' next i
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingCount lib "TCAPI40" () As Long
-
- 'Description
- 'This function will print the current drawing. Set showdialog to TRUE if
- 'you want to see the print dialog box and have access to the page setup
- 'parameters.
- '
- 'Input Parameters
- 'Long showdialog 1 to show print dialog box, 0 if no print dialog box
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- ' ...
- ' result = TCWDrawingPrint(0)
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingPrint lib "TCAPI40" ( _
- ByVal showdialog As Long _
- ) As Long
-
- 'Description
- 'This function will return the handle of the active drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Handle of active drawing as a Long. If NULL, then no active drawing. If you
- 'believe this should have returned a drawing handle, use TCWLastErrorGet to
- 'retrieve the error string.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hDrawing As Long
- ' hDrawing = TCWDrawingActive()
- ' if (hDrawing = NULL) then
- ' Msgbox "No active drawing".
- ' ...
- '
- 'Declaration
- Declare Function TCWDrawingActive lib "TCAPI40" () As Long
-
- 'Section
- 'APPLICATION - Undo and Redo Functions
-
- 'Description
- 'This function will delete all the undo records in the current drawing. You will
- 'not be able to Redo any previous actions after making this call.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWUndo, TCWRedo
- '
- 'Coding Example
- ' ...
- ' result = TCWUndoClear()
- ' ...
- '
- 'Declaration
- Declare Function TCWUndoClear lib "TCAPI40" () As Long
-
- 'Description
- 'This function will reverse the last n changes in the current drawing.
- '
- 'Input Parameters
- 'long n number of changes to undo
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWUndoClear, TCWRedo
- '
- 'Coding Example
- ' ...
- ' result = TCWUndo(2) 'undo last 2 operations
- '
- 'Declaration
- Declare Function TCWUndo lib "TCAPI40" ( _
- ByVal n As Long _
- ) As Long
-
- 'Description
- 'This function will reverse the effect of the last undo.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWUndoClear, TCWUndo
- '
- 'Coding Example
- ' ...
- ' result = TCWRedo() 'oops - get it back!
- '
- 'Declaration
- Declare Function TCWRedo lib "TCAPI40" () As Long
-
- 'Section
- 'DRAWING - Selection Functions
-
- 'Description
- 'This function selects the all graphics in the drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. There was at least one graphic to select.
- 'Non-zero if errors or no graphics to select. Use TCWLastErrorGet to see if there
- 'was an error.
- '
- 'See Also
- 'TCWDeselectAll
- '
- 'Coding Example
- ' ...
- ' result = TCWSelectAll()
- ' if (result = 0) then
- ' 'change all graphics to have PenColor Red
- ' ...
- '
- 'Declaration
- Declare Function TCWSelectAll lib "TCAPI40" () As Long
-
- 'Description
- 'This function will deselect all selected graphics.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. At least one graphic was deselected.
- 'Non-zero if errors or no graphics to deselect. Use TCWLastErrorGet see if there was
- 'an error.
- '
- 'See Also
- 'TCWSelectAll
- '
- 'Coding Example
- ' ...
- ' result = TCWDeselectAll()
- ' ...
- '
- 'Declaration
- Declare Function TCWDeselectAll lib "TCAPI40" () As Long
-
- 'Description
- 'This function will delete all selected graphics.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. At least one graphic was deleted.
- 'Non-zero if errors or no graphics to delete. Use TCWLastErrorGet to see if there was
- 'an error.
- '
- 'See Also
- 'TCWClearAll
- '
- 'Coding Example
- ' 'select all graphics with type = circle
- ' g = TCWSelectByQuery("Type = Circle/Ellipse")
- ' result = TCWClearSelection()
- ' ...
- '
- 'Declaration
- Declare Function TCWClearSelection lib "TCAPI40" () As Long
-
- 'Description
- 'This function will delete all graphics in the current drawing.
- '
- 'This deletes every graphic, not just what is selected. To only delete
- 'selected graphics, see TCWClearSelection.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. At least one graphic was deleted.
- 'Non-zero if errors or no graphics to delete. Use TCWLastErrorGet to see if there was
- 'an error.
- '
- 'See Also
- 'TCWClearSelection
- '
- 'Coding Example
- ' ...
- ' result = TCWClearAll()
- ' ...
- '
- 'Declaration
- Declare Function TCWClearAll lib "TCAPI40" () As Long
-
- 'Description
- 'This function will delete all construction graphics in the current drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. At least one graphic was deleted.
- 'Non-zero if errors or no graphics to delete. Use TCWLastErrorGet to see if there was
- 'an error.
- '
- 'See Also
- '
- 'Coding Example
- ' ...
- ' result = TCWClearAllConstructions()
- ' ...
- '
- 'Declaration
- Declare Function TCWClearAllConstructions lib "TCAPI40" () As Long
-
- 'Description
- 'This function will select graphics in the drawing based on specified criteria.
- 'An empty query is equivalent to SELECTED. Use TCWSelectionCount and TCWSelectionAt
- 'to cycle through the selected graphics.
- '
- 'The query language is defined as follows:
- '
- '"query" -> "expr"
- '"expr" -> "expr" OR "expr" | "expr" AND "expr" | ("expr") | NOT "expr" | "atom"
- '"atom" -> ALL | SELECTED | "field_name" "relation" "value"
- '"rel" -> = | <> | < | <= | > | >=
- '"field_name" -> "string" | "any_string"
- '"value" -> "string" | "any_string"
- '"string" -> string without spaces which is not a keyword and doesn't have any reserved characters
- '"any_string" -> string without any double quote marks, may have spaces
- '
- 'Keywords for query are:
- ' ALL, SELECTED, OR, AND, NOT
- '
- 'Reserved characters are:
- ' =, <, >, ", (, )
- '
- 'Precedence (in descending order):
- ' ()
- ' NOT
- ' AND
- ' OR
- '
- 'Input Parameters
- 'String s string for search
- '
- 'Return Value
- 'First graphic in the selection as a Long.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim g As Long
- ' 'This query adds all elements from the electrical layer to the current selection
- ' g = TCWSelectByQuery("SELECTED OR Layer = electrical")
- ' if (g = NULL) then
- ' MsgBox "No graphics met criteria".
- ' Stop
- ' ...
- '
- 'Declaration
- Declare Function TCWSelectByQuery lib "TCAPI40" ( _
- ByRef s As String _
- ) As Long
-
- 'Description
- 'This function will return a count of the number of graphics currently
- 'selected in the drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'The number of graphics that are currently selected as a Long.
- '
- 'See Also
- 'TCWSelection, TCWSelectByQuery
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSelectionCount lib "TCAPI40" () As Long
-
- 'Description
- 'This function will return the handle of the requested graphic in the drawing. The index
- 'should be a number from 0 to the value-1 returned by TCWSelectionCount.
- '
- 'Input Parameters
- 'Long index requested select graphic index
- '
- 'Return Value
- 'The handle of the graphic as a Long.
- '
- 'See Also
- 'TCWSelectionCount
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSelectionAt lib "TCAPI40" ( _
- ByVal index As Long _
- ) As Long
-
- 'Section
- 'DRAWING - Construction Line Creation Functions
-
- 'These graphic creation functions add the graphic to the drawing.
- 'Do not use the graphic handle returned from these functions with
- 'TCWGraphicAppend to append to the drawing or another graphic.
- '
- 'All construction lines and circles are put on a CONSTRUCTION layer.
-
- 'Description
- 'This function will draw a construction line at the specified angle.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the first point
- 'Double y0 Y coordinate of the first point
- 'Double z0 Z coordinate of the first point
- 'Double x1 X coordinate of the second point
- 'Double y1 Y coordinate of the second point
- 'Double z1 Z coordinate of the second point
- '
- 'Return Value
- 'Returns the handle to the construction line as a long.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hConstr As Long
- ' ...
- ' hConstr = TCWConstructionAngularLine(x1, y1, z1, x2, y2, z2)
- ' if (hConstr = NULL) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWConstructionAngularLine lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a horizontal construction line.
- '
- 'Input Parameters
- 'Double x0 X coordinate of point on the line
- 'Double y0 Y coordinate of point on the line
- 'Double z0 Z coordinate of point on the line
- '
- 'Return Value
- 'Returns the handle to the construction line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hConstr As Long
- ' Dim xc As Double
- ' Dim yc As Double
- ' 'get center of view for construction line placement
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- ' hConstr = TCWConstructionHorizontalLine(xc, yc, 0.0)
- ' if (hConstr = NULL) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWConstructionHorizontalLine lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a vertical construction line.
- '
- 'Input Parameters
- 'Double x0 X coordinate of point on the line
- 'Double y0 Y coordinate of point on the line
- 'Double z0 Z coordinate of point on the line
- '
- 'Return Value
- 'Returns the handle to the construction line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hConstr As Long
- ' Dim xc As Double
- ' Dim yc As Double
- ' 'get center of view for construction line placement
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- ' hConstr = TCWConstructionVerticalLine(xc, yc, 0.0)
- ' if (hConstr = NULL) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWConstructionVerticalLine lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a construction circle defined by its center point
- 'and a point on its perimeter.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the center point
- 'Double y0 Y coordinate of the center point
- 'Double z0 Z coordinate of the center point
- 'Double x1 X coordinate of the perimeter point
- 'Double y1 Y coordinate of the perimeter point
- 'Double z1 Z coordinate of the perimeter point
- '
- 'Return Value
- 'Returns the handle to the construction line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hConstr As Long
- ' Dim xc As Double
- ' Dim yc As Double
- ' 'get center of view for construction circle placement
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- ' hConstr = TCWConstructionCenterAndPointCircle(xc, yc, 0.0, xc+2#, yc+2#, 0.0)
- ' if (hConstr = NULL) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWConstructionCenterAndPointCircle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a construction circle that passes through two defined
- 'points 180 degrees apart.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the first point
- 'Double y0 Y coordinate of the first point
- 'Double z0 Z coordinate of the first point
- 'Double x1 X coordinate of the second point
- 'Double y1 Y coordinate of the second point
- 'Double z1 Z coordinate of the second point
- '
- 'Return Value
- 'Returns the handle to the construction line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hConstr As Long
- ' Dim xc As Double
- ' Dim yc As Double
- ' 'get center of view for construction circle placement
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- ' hConstr = TCWConstructionDoublePointCircle(xc-2#, yc-2#, 0.0, xc+2#, yc+2#, 0.0)
- ' if (hConstr = NULL) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWConstructionDoublePointCircle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a construction circle that passes through three
- 'defined points.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the first point
- 'Double y0 Y coordinate of the first point
- 'Double z0 Z coordinate of the first point
- 'Double x1 X coordinate of the second point
- 'Double y1 Y coordinate of the second point
- 'Double z1 Z coordinate of the second point
- 'Double x2 X coordinate of the third point
- 'Double y2 Y coordinate of the third point
- 'Double z2 Z coordinate of the third point
- '
- 'Return Value
- 'Returns the handle to the construction line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- ' Dim hConstr As Long
- ' Dim xc As Double
- ' Dim yc As Double
- ' 'get center of view for construction circle placement
- ' hConstr = TCWConstructionTriplePointCircle(1#, 1#, 0.0, 2#, 2#, 0.0, 3#,3#, 0.0)
- ' if (hConstr = NULL) then
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWConstructionTriplePointCircle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal x2 As Double, _
- ByVal y2 As Double, _
- ByVal z2 As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Point Creation Functions
-
- 'These graphic creation functions add the graphic to the drawing.
- 'Do not use the graphic handle returned from these functions with
- 'TCWGraphicAppend to append to the drawing or another graphic.
-
- 'Description
- 'This function will create a point that is a "dot".
- '
- 'Input Parameters
- 'Double x0 X coordinate for the point
- 'Double y0 Y coordinate for the point
- 'Double z0 Z coordinate for the point
- '
- 'Return Value
- 'Returns the handle to the point graphic as a Long.
- '
- 'See Also
- 'TCWStar, TCWSquare, TCWCross, TCWCircle
- '
- 'Coding Example
- ' Dim g As Long
- ' g = TCWDot(2.0, 3.0, 0.0)
- ' if (g = NULL)
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWDot lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will create a point that is a "star".
- '
- 'Input Parameters
- 'Double x0 X coordinate for the point
- 'Double y0 Y coordinate for the point
- 'Double z0 Z coordinate for the point
- '
- 'Return Value
- 'Returns the handle to the point graphic as a Long.
- '
- 'See Also
- 'TCWDot, TCWSquare, TCWCross, TCWCircle
- '
- 'Coding Example
- ' Dim g As Long
- ' g = TCWStar(2.0, 3.0, 0.0)
- ' if (g = NULL)
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWStar lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- ' This function will create a point that is a "square".
- '
- 'Input Parameters
- 'Double x0 X coordinate for the point
- 'Double y0 Y coordinate for the point
- 'Double z0 Z coordinate for the point
- '
- 'Return Value
- 'Returns the handle to the point graphic as a Long.
- '
- 'See Also
- 'TCWDot, TCWStar, TCWCross, TCWCircle
- '
- 'Coding Example
- ' Dim g As Long
- ' g = TCWSquare(2.0, 3.0, 0.0)
- ' if (g = NULL)
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWSquare lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- ' This function will create a point that is a "cross".
- '
- 'Input Parameters
- 'Double x0 X coordinate for the point
- 'Double y0 Y coordinate for the point
- 'Double z0 Z coordinate for the point
- '
- 'Return Value
- 'Returns the handle to the point graphic as a Long.
- '
- 'See Also
- 'TCWDot, TCWStar, TCWSquare, TCWCircle
- '
- 'Coding Example
- ' Dim g As Long
- ' g = TCWCross(2.0, 3.0, 0.0)
- ' if (g = NULL)
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWCross lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- ' This function will create a point that is a "circle".
- '
- 'Input Parameters
- 'Double x0 X coordinate for the point
- 'Double y0 Y coordinate for the point
- 'Double z0 Z coordinate for the point
- '
- 'Return Value
- 'Returns the handle to the point graphic as a Long.
- '
- 'See Also
- ' TCWDot, TCWStar, TCWSquare, TCWCross
- '
- 'Coding Example
- ' Dim g As Long
- ' g = TCWCircle(2.0, 3.0, 0.0)
- ' if (g = NULL)
- ' 'check error
- ' ...
- '
- 'Declaration
- Declare Function TCWCircle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Line Creation Functions
-
- 'These graphic creation functions add the graphic to the drawing.
- 'Do not use the graphic handle returned from these functions with
- 'TCWGraphicAppend to append to the drawing or another graphic.
-
- 'Description
- 'This function will draw a single line segment from two specified end points.
- '
- 'Input Parameters
- 'Double x0 X coordinate for the first point
- 'Double y0 Y coordinate for the first point
- 'Double z0 Z coordinate for the first point
- 'Double x1 X coordinate for the second point
- 'Double y1 Y coordinate for the second point
- 'Double z1 Z coordinate for the second point
- '
- 'Return Value
- 'Returns the handle to the line graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLineSingle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a regular polygon with the specified number
- 'of sides.
- '
- 'Input Parameters
- 'Double x0 X coordinate for the center point
- 'Double y0 Y coordinate for the center point
- 'Double z0 Z coordinate for the center point
- 'Double x1 X coordinate for the corner point
- 'Double y1 Y coordinate for the corner point
- 'Double z1 Z coordinate for the corner point
- 'Long nsides number of sides
- '
- 'Return Value
- 'Returns the handle of the polygon graphic as a Long. The polygon is
- 'constructed such that it would fit exactly inside a circle with
- 'the same center and radius.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLinePolygon lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal nsides As Long _
- ) As Long
-
- 'Description
- 'This function will draw an orthogonal rectangle.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the upper left corner
- 'Double y0 Y coordinate of the upper left corner
- 'Double z0 Z coordinate of the upper left corner
- 'Double x1 X coordinate of the lower right corner
- 'Double y1 Y coordinate of the lower right corner
- 'Double z1 Z coordinate of the lower right corner
- '
- 'Return Value
- 'Returns the handle of a Graphic as a Long with contains 5 vertices.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLineRectangle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a rectangle oriented at the specified angle.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the upper left corner
- 'Double y0 Y coordinate of the upper left corner
- 'Double z0 Z coordinate of the upper left corner
- 'Double x1 X coordinate of the lower right corner
- 'Double y1 Y coordinate of the lower right corner
- 'Double z1 Z coordinate of the lower right corner
- 'Double height angle of rotation in radians
- '
- 'Return Value
- 'Returns a handle to a graphic with 5 vertices in the shape of a rectangle. The
- 'return value is a long. The fifth vertex is equal to the first. The two points
- 'are the ends of the base edge. The height of the rectangle is drawn in the direction
- 'that would be a "right turn" when traveling from the first point to the second.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLineRotatedRectangle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal height As Double _
- ) As Long
-
- 'Description
- 'This function will draw a line perpendicular to an existing line.
- '
- 'Input Parameters
- 'Long g handle of line to make new line perpendicular to
- 'Double x0 X coordinate of the point on the existing line
- 'Double y0 Y coordinate of the point on the existing line
- 'Double z0 Z coordinate of the point on the existing line
- '
- 'Return Value
- 'Returns the handle of the perpendicular line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLinePerpendicular lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a line parallel to an existing line, at a
- 'specified distance from the line.
- '
- 'Input Parameters
- 'Long g handle of line to make new line parallel to
- 'Double x0 X coordinate of the new line
- 'Double y0 Y coordinate of the new line
- 'Double z0 Z coordinate of the new line
- '
- 'Return Value
- 'Returns the handle to the new parallel line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLineParallel lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Multi-line Creation Functions
-
- 'These graphic creation functions add the graphic to the drawing.
- 'Do not use the graphic handle returned from these functions with
- 'TCWGraphicAppend to append to the drawing or another graphic.
-
- 'Description
- 'This function will start the creation of a series of connected segments.
- '
- 'Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next segment.
- 'Use TCWGraphicClose to close the multi-line into a polygon.
- '
- 'Input Parameters
- 'Double x0 X coordinate of first end point
- 'Double y0 Y coordinate of first end point
- 'Double z0 Z coordinate of first end point
- '
- 'Return Value
- 'Returns the handle to the graphic as a Long.
- '
- 'See Also
- 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLineMultiline lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will start the creation of an irregular polygon.
- '
- 'Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next point of the polygon.
- 'Use TCWGraphicClose to close the multi-line into the polygon.
- '
- 'Input Parameters
- 'Double x0 X coordinate of first end point
- 'Double y0 Y coordinate of first end point
- 'Double z0 Z coordinate of first end point
- '
- 'Return Value
- 'Returns the handle to the first segment as a Long.
- '
- 'See Also
- 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLineIrregularPolygon lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will start the creation of a series of connected double lines.
- '
- 'Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next point of the segment.
- 'Use TCWGraphicClose to close the multi-double line into a polygon.
- '
- 'Input Parameters
- 'Double x0 X coordinate of first end point
- 'Double y0 Y coordinate of first end point
- 'Double z0 Z coordinate of first end point
- '
- 'Return Value
- 'Returns the handle to the graphic as a Long.
- '
- 'See Also
- 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDoubleLineMultiline lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will start the creation of a double line polygon with an
- 'arbitrary number of sides.
- '
- 'Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next segment.
- 'Use TCWGraphicClose to close the multi-line into a polygon.
- '
- 'Input Parameters
- 'Double x0 X coordinate of first end point
- 'Double y0 Y coordinate of first end point
- 'Double z0 Z coordinate of first end point
- '
- 'Return Value
- 'Returns the handle to the graphic as a long.
- '
- 'See Also
- 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDoubleLineIrregularPolygon lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will start the creation of a bezier curve, connecting
- 'two end points that will gravitate toward control points along the path.
- '
- 'Use TCWGraphicClose to close the bezier curve, matching the last end point
- 'with the first end point.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the first end point
- 'Double y0 Y coordinate of the first end point
- 'Double z0 Z coordinate of the first end point
- '
- 'Return Value
- 'Returns the handle to the graphic as a Long.
- '
- 'See Also
- 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWCurveBezier lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will start the creation of a spline curve, connecting
- 'a series of points into a continuous curve.
- '
- 'Use TCWGraphicClose to close the spline curve, matching the last end point
- 'with the first end point.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the first end point
- 'Double y0 Y coordinate of the first end point
- 'Double z0 Z coordinate of the first end point
- '
- 'Return Value
- 'Returns the handle to the graphic as a Long.
- '
- 'See Also
- 'TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWCurveSpline lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Double Line Creation Functions
-
- 'These graphic creation functions add the graphic to the drawing.
- 'Do not use the graphic handle returned from these functions with
- 'TCWGraphicAppend to append to the drawing or another graphic.
-
- 'Description
- 'This function will draw a double line segment from two specified end points.
- '
- 'Input Parameters
- 'Double x0 X coordinate for the first point
- 'Double y0 Y coordinate for the first point
- 'Double z0 Z coordinate for the first point
- 'Double x1 X coordinate for the second point
- 'Double y1 Y coordinate for the second point
- 'Double z1 Z coordinate for the second point
- '
- 'Return Value
- 'Returns the handle to the double line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDoubleLineSingle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a regular double line polygon with the specified
- 'number of sides.
- '
- 'Input Parameters
- 'Double x0 X coordinate for the center point
- 'Double y0 Y coordinate for the center point
- 'Double z0 Z coordinate for the center point
- 'Double x1 X coordinate for the corner point
- 'Double y1 Y coordinate for the corner point
- 'Double z1 Z coordinate for the corner point
- 'Long nsides number of sides
- '
- 'Return Value
- 'Returns the handle of the polygon graphic as a Long. The polygon is
- 'constructed such that it would fit exactly inside a circle with the same
- 'center and radius.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDoubleLinePolygon lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal nsides As Long _
- ) As Long
-
- 'Description
- 'This function will draw an orthogonal double line rectangle.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the upper left corner
- 'Double y0 Y coordinate of the upper left corner
- 'Double z0 Z coordinate of the upper left corner
- 'Double x1 X coordinate of the lower right corner
- 'Double y1 Y coordinate of the lower right corner
- 'Double z1 Z coordinate of the lower right corner
- '
- 'Return Value
- 'Returns the handle of a graphic with 5 vertices. The return value is a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDoubleLineRectangle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a double line rectangle oriented at the specified angle.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the upper left corner
- 'Double y0 Y coordinate of the upper left corner
- 'Double z0 Z coordinate of the upper left corner
- 'Double x1 X coordinate of the lower right corner
- 'Double y1 Y coordinate of the lower right corner
- 'Double z1 Z coordinate of the lower right corner
- 'Double height angle of rotation in radians
- '
- 'Return Value
- 'Returns a handle to a graphic with 5 vertices in the shape of a rectangle.
- 'The fifth vertex is equal to the first. The two points are the ends of the
- 'base edge. The height of the rectangle is drawn in the direction that would
- 'be a "right turn" when traveling from the first point to the second.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDoubleLineRotatedRectangle lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal height As Double _
- ) As Long
-
- 'Description
- 'This function will draw a double line perpendicular to an existing line.
- '
- 'Input Parameters
- 'Long g handle of line to make new line perpendicular to
- 'Double x0 X coordinate of the point on the existing line
- 'Double y0 Y coordinate of the point on the existing line
- 'Double z0 Z coordinate of the point on the existing line
- 'Double x1 X coordinate of the second point on the new line
- 'Double y1 Y coordinate of the second point on the new line
- 'Double z1 Z coordinate of the second point on the new line
- '
- 'Return Value
- 'Returns the handle of the perpendicular double line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDoubleLinePerpendicular lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a double line parallel to an existing line, at a
- 'specified distance from the line.
- '
- 'Input Parameters
- 'Long g handle of line to make new line parallel to
- 'Double x0 X coordinate of the new line
- 'Double y0 Y coordinate of the new line
- 'Double z0 Z coordinate of the new line
- '
- 'Return Value
- 'Returns the handle to the new parallel line as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDoubleLineParallel lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Section
- ' DRAWING - Circle and Ellipse Creation Functions
-
- 'These graphic creation functions add the graphic to the drawing.
- 'Do not use the graphic handle returned from these functions with
- 'TCWGraphicAppend to append to the drawing or another graphic.
-
- 'Description
- 'This function will draw a circle from the specified center point and radius.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the center point
- 'Double y0 Y coordinate of the center point
- 'Double z0 Z coordinate of the center point
- 'Double x1 X coordinate of the radius point
- 'Double y1 Y coordinate of the radius point
- 'Double z1 Z coordinate of the radius point
- '
- 'Return Value
- 'Returns the handle to the circle as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWCircleCenterAndPoint lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a circle using two opposite points on its perimeter.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the first point
- 'Double y0 Y coordinate of the first point
- 'Double z0 Z coordinate of the first point
- 'Double x1 X coordinate of the second point
- 'Double y1 Y coordinate of the second point
- 'Double z1 Z coordinate of the second point
- '
- 'Return Value
- 'Returns the handle to the circle as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWCircleDoublePoint lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw a circle by defining three point on the circle's
- 'perimeter.
- '
- 'Input Parameters
- 'Double x0 X coordinate of the first point
- 'Double y0 Y coordinate of the first point
- 'Double z0 Z coordinate of the first point
- 'Double x1 X coordinate of the second point
- 'Double y1 Y coordinate of the second point
- 'Double z1 Z coordinate of the second point
- 'Double x2 X coordinate of the third point
- 'Double y2 Y coordinate of the third point
- 'Double z2 Z coordinate of the third point
- '
- 'Return Value
- 'Returns the handle to the circle as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWCircleTriplePoint lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal x2 As Double, _
- ByVal y2 As Double, _
- ByVal z2 As Double _
- ) As Long
-
- 'Description
- 'This function will draw an ellipse by defining its bounding rectangle.
- '
- 'Input Parameters
- 'Double x0 X coordinate of bounding rectangle's upper left corner
- 'Double y0 Y coordinate of bounding rectangle's upper left corner
- 'Double z0 Z coordinate of bounding rectangle's upper left corner
- 'Double x1 X coordinate of bounding rectangle's lower right corner
- 'Double y1 Y coordinate of bounding rectangle's lower right corner
- 'Double z1 Z coordinate of bounding rectangle's lower right corner
- '
- 'Return Value
- 'Returns the handle to the ellipse as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWEllipse lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will draw an ellipse rotated by specifying the ellipse's
- 'center point, and major and minor axis radius points.
- '
- 'Input Parameters
- 'Double x0 X coordinate of ellipse's center point
- 'Double y0 Y coordinate of ellipse's center point
- 'Double z0 Z coordinate of ellipse's center point
- 'Double x1 X coordinate of major axis radius point
- 'Double y1 Y coordinate of major axis radius point
- 'Double z1 Z coordinate of major axis radius point
- 'Double x2 X coordinate of minor axis radius point
- 'Double y2 Y coordinate of minor axis radius point
- 'Double z2 Z coordinate of minor axis radius point
- '
- 'Return Value
- 'Returns the handle of the rotated ellipse as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWEllipseRotatedEllipse lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal x2 As Double, _
- ByVal y2 As Double, _
- ByVal z2 As Double _
- ) As Long
-
- 'Description
- 'This function will draw an ellipse, specified by the ratio of the
- 'major axis length to the minor axis length.
- '
- 'Input Parameters
- 'Double x0 X coordinate of ellipse's center point
- 'Double y0 Y coordinate of ellipse's center point
- 'Double z0 Z coordinate of ellipse's center point
- 'Double x1 X coordinate of radius in Y direction
- 'Double y1 Y coordinate of radius in Y direction
- 'Double z1 Z coordinate of radius in Y direction
- 'Double xyratio ratio of Rx/Ry
- '
- 'Return Value
- 'Returns the handle to the ellipse as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWEllipseFixedRatio lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal xyratio As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Arc Creation Functions
-
- 'These graphic creation functions add the graphic to the drawing.
- 'Do not use the graphic handle returned from these functions with
- 'TCWGraphicAppend to append to the drawing or another graphic.
-
- 'Description
- 'This function will draw a circular arc specified by it's center point,
- 'point on it's circumference and a start and end angle.
- '
- 'Input Parameters
- 'Double x0 X coordinate of arc's center point
- 'Double y0 Y coordinate of arc's center point
- 'Double z0 Z coordinate of arc's center point
- 'Double x1 X coordinate of the radius point
- 'Double y1 Y coordinate of the radius point
- 'Double z1 Z coordinate of the radius point
- 'Double startangle starting angle in radians
- 'Double endangle ending angle in radians
- '
- 'Return Value
- 'Returns the handle of the arc as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWArcCenterAndPoint lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal startangle As Double, _
- ByVal endangle As Double _
- ) As Long
-
- 'Description
- 'This function will draw a circular arc from specified end points
- 'of its diameter.
- '
- 'Input Parameters
- 'Double x0 X coordinate of first end point
- 'Double y0 Y coordinate of first end point
- 'Double z0 Z coordinate of first end point
- 'Double x1 X coordinate of second end point
- 'Double y1 Y coordinate of second end point
- 'Double z1 Z coordinate of second end point
- 'Double startangle starting angle in radians
- 'Double endangle ending angle in radians
- '
- 'Return Value
- 'Returns the handle to the arc as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWArcDoublePoint lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal startangle As Double, _
- ByVal endangle As Double _
- ) As Long
-
- 'Description
- 'This function will draw a circular arc by defining (1) its starting
- 'point, (2) a point on its perimeter and (3) its ending point.
- '
- 'Input Parameters
- 'Double x0 X coordinate of starting point
- 'Double y0 Y coordinate of starting point
- 'Double z0 Z coordinate of starting point
- 'Double x1 X coordinate of point on perimeter
- 'Double y1 Y coordinate of point on perimeter
- 'Double z1 Z coordinate of point on perimeter
- 'Double x2 X coordinate of ending point
- 'Double y2 Y coordinate of ending point
- 'Double z2 Z coordinate of ending point
- '
- 'Return Value
- 'Returns the handle to the arc as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWArcTriplePoint lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal x2 As Double, _
- ByVal y2 As Double, _
- ByVal z2 As Double _
- ) As Long
-
- 'Description
- 'This function will draw an elliptical arc specified by its bounding
- 'rectangle, starting and ending angles.
- '
- 'Input Parameters
- 'Double x0 X coordinate of bounding rectangle's upper left corner
- 'Double y0 Y coordinate of bounding rectangle's upper left corner
- 'Double z0 Z coordinate of bounding rectangle's upper left corner
- 'Double x1 X coordinate of bounding rectangle's lower right corner
- 'Double y1 Y coordinate of bounding rectangle's lower right corner
- 'Double z1 Z coordinate of bounding rectangle's lower right corner
- 'Double startangle starting angle in radians
- 'Double endangle ending angle in radians
- '
- 'Return Value
- 'Returns a handle to the elliptical arc as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWArcElliptical lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal startangle As Double, _
- ByVal endangle As Double _
- ) As Long
-
- 'Description
- 'This function will draw an elliptical arc rotated by specifying the ellipse's
- 'center point, and major and minor axis radius points, start and end angles.
- '
- 'Input Parameters
- 'Double x0 X coordinate of elliptical arc's center point
- 'Double y0 Y coordinate of elliptical arc's center point
- 'Double z0 Z coordinate of elliptical arc's center point
- 'Double x1 X coordinate of major axis radius point
- 'Double y1 Y coordinate of major axis radius point
- 'Double z1 Z coordinate of major axis radius point
- 'Double x2 X coordinate of minor axis radius point
- 'Double y2 Y coordinate of minor axis radius point
- 'Double z2 Z coordinate of minor axis radius point
- 'Double startangle starting angle in radians
- 'Double endangle ending angle in radians
- '
- 'Return Value
- 'Returns the handle of the rotated elliptical arc as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWArcRotatedElliptical lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal x2 As Double, _
- ByVal y2 As Double, _
- ByVal z2 As Double, _
- ByVal startangle As Double, _
- ByVal endangle As Double _
- ) As Long
-
- 'Description
- 'This function will draw an elliptical arc, specified by the ratio of the
- 'major axis length to the minor axis length.
- '
- 'Input Parameters
- 'Double x0 X coordinate of ellipse's center point
- 'Double y0 Y coordinate of ellipse's center point
- 'Double z0 Z coordinate of ellipse's center point
- 'Double x1 X coordinate of radius in Y direction
- 'Double y1 Y coordinate of radius in Y direction
- 'Double z1 Z coordinate of radius in Y direction
- 'Double xyratio ratio of Rx/Ry
- 'Double startangle starting angle in radians
- 'Double endangle ending angle in radians
- '
- 'Return Value
- 'Returns the handle to the ellipse as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWArcEllipticalFixedRatio lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal xyratio As Double, _
- ByVal startangle As Double, _
- ByVal endangle As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Text Creation Function
-
- 'This graphic creation function adds the graphic to the drawing.
- 'Do not use the graphic handle returned from this function with
- 'TCWGraphicAppend to append to the drawing or another graphic.
-
- 'Description
- 'This function will create text starting at the point specified.
- '
- 'Input Parameters
- 'Double x0 X coordinate of text's starting point
- 'Double y0 Y coordinate of text's starting point
- 'Double z0 Z coordinate of text's starting point
- 'String textstr text string
- 'Double size font size
- 'Double angle angle of text
- '
- 'Return Value
- 'Returns a handle to the text.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWText lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByRef textstr As String, _
- ByVal size As Double, _
- ByVal angle As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Dimension Creation Functions
-
- 'These graphic creation functions add the graphic to the drawing.
- 'Do not use the graphic handle returned from these functions with
- 'TCWGraphicAppend to append to the drawing or another graphic.
-
- 'Description
- 'This function will create a linear dimension showing horizontal distance.
- '
- 'Input Parameters
- 'Double x0 X coordinate of first extension line
- 'Double y0 Y coordinate of first extension line
- 'Double z0 Z coordinate of first extension line
- 'Double x1 X coordinate of second extension line
- 'Double y1 Y coordinate of second extension line
- 'Double z1 Z coordinate of second extension line
- 'Double x2 X coordinate of dimension
- 'Double y2 Y coordinate of dimension
- 'Double z2 Z coordinate of dimension
- '
- 'Return Value
- 'Returns the handle to the dimension as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDimensionHorizontal lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal x2 As Double, _
- ByVal y2 As Double, _
- ByVal z2 As Double _
- ) As Long
-
- 'Description
- 'This function will create a linear dimension showing horizontal distance.
- '
- 'Input Parameters
- 'Long g entity to horizontally dimension
- 'Double x0 X coordinate for dimension line location
- 'Double y0 Y coordinate for dimension line location
- 'Double z0 Z coordinate for dimension line location
- '
- 'Return Value
- 'Returns the handle to the dimension as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDimensionHorizontalEntity lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will create a linear dimension showing vertical distance.
- '
- 'Input Parameters
- 'Double x0 X coordinate of first extension line
- 'Double y0 Y coordinate of first extension line
- 'Double z0 Z coordinate of first extension line
- 'Double x1 X coordinate of second extension line
- 'Double y1 Y coordinate of second extension line
- 'Double z1 Z coordinate of second extension line
- 'Double x2 X coordinate of dimension
- 'Double y2 Y coordinate of dimension
- 'Double z2 Z coordinate of dimension
- '
- 'Return Value
- 'Returns the handle to the dimension as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDimensionVertical lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal x2 As Double, _
- ByVal y2 As Double, _
- ByVal z2 As Double _
- ) As Long
-
- 'Description
- 'This function will create a linear dimension showing vertical distance.
- '
- 'Input Parameters
- 'Long g entity to vertically dimension
- 'Double x0 X coordinate for dimension line location
- 'Double y0 Y coordinate for dimension line location
- 'Double z0 Z coordinate for dimension line location
- '
- 'Return Value
- 'Returns the handle to the dimension as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDimensionVerticalEntity lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will create a linear dimension showing absolute distance
- 'between two points.
- '
- 'Input Parameters
- 'Double x0 X coordinate of first extension line
- 'Double y0 Y coordinate of first extension line
- 'Double z0 Z coordinate of first extension line
- 'Double x1 X coordinate of second extension line
- 'Double y1 Y coordinate of second extension line
- 'Double z1 Z coordinate of second extension line
- 'Double x2 X coordinate of dimension
- 'Double y2 Y coordinate of dimension
- 'Double z2 Z coordinate of dimension
- '
- 'Return Value
- 'Returns the handle to the dimension as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDimensionParallel lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double, _
- ByVal x2 As Double, _
- ByVal y2 As Double, _
- ByVal z2 As Double _
- ) As Long
-
- 'Description
- 'This function will create a linear dimension showing parallel distance.
- '
- 'Input Parameters
- 'Long g entity to dimension
- 'Double x0 X coordinate for dimension line location
- 'Double y0 Y coordinate for dimension line location
- 'Double z0 Z coordinate for dimension line location
- '
- 'Return Value
- 'Returns the handle to the dimension as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWDimensionParallelEntity lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Undo Record Functions
-
- 'Use these functions to create your own kind of undo which includes one or
- 'more operations. Then, with one undo you can get back to the beginning.
- 'TCADAPI will create undo records for all align functions, graphic creation and
- 'deletion, selection deletion, selection scaling, rotating and moving, explode, and group.
-
- 'Description
- 'This function will start an undo record. NOTE: a start record MUST be matched
- 'with an end record.
- '
- 'Input Parameters
- 'Long d handle of a drawing
- 'String title string to associate with undo record
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWUndoRecordAddGraphic, TCWUndoRecordEnd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWUndoRecordStart lib "TCAPI40" ( _
- ByVal d As Long, _
- ByRef title As String _
- ) As Long
-
- 'Description
- 'This function will add graphics to the undo record. Use this
- 'function to accumulate graphics that you may want to undo.
- '
- 'Input Parameters
- 'Long d handle of a drawing
- 'Long g graphic to add to undo record
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWUndoRecordStart, TCWUndoRecordEnd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWUndoRecordAddGraphic lib "TCAPI40" ( _
- ByVal d As Long, _
- ByVal g As Long _
- ) As Long
-
- 'Description
- 'This function will close an opened undo record.
- '
- 'Input Parameters
- 'Long d handle of a drawing
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWUndoRecordStart, TCWUndoRecordAddGraphic
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWUndoRecordEnd lib "TCAPI40" ( _
- ByVal d As Long _
- ) As Long
-
- 'Section
- 'DRAWING - Block Functions
-
- 'Description
- 'This function will return the handle of a block with the specified
- 'block name.
- '
- 'Input Parameters
- 'String blockname name of block to return
- '
- 'Return Value
- 'Handle of the block as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWBlockGet lib "TCAPI40" ( _
- ByRef blockname As String _
- ) As Long
-
- 'Description
- 'This function will create a block from the selected graphics. The block
- 'will be named from the name specified.
- '
- 'Input Parameters
- 'String blockname string for block name
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWBlockCreate lib "TCAPI40" ( _
- ByRef blockname As String _
- ) As Long
-
- 'Description
- 'This function will insert a block into the drawing.
- '
- 'Input Parameters
- 'String blockname block name to insert
- 'Double x0 x coordinate for where to insert block
- 'Double y0 y coordinate for where to insert block
- 'Double z0 z coordinate for where to insert block
- '
- 'Return Value
- 'Returns the handle to the new instance of the block as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWBlockInsert lib "TCAPI40" ( _
- ByRef blockname As String, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Section
- 'DRAWING - Get and Set Property Functions
-
- 'Description
- 'This function will return the value of the property that has been
- 'requested. This function is written in Basic due to problems with Enable
- 'not supporting Variants with DLLs.
- '
- 'Input Parameters
- 'String propertyname name of property look up
- '
- 'AVAILABLE PROPERTIES: DESCRIPTION:
- '"PenColor" pen color as &H00bbggrr or -3 for by layer, -4 for by block
- '"PenWidth" pen width as a Double
- '"PenScale" pen scale as a Double
- '"PenStyle" pen style as a Integer
- '"BrushColor" brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
- '"BrushScale" brush scale as a Double
- '"BrushAngle" brush angle as a Double
- '"BrushStyle" brush style as a Double
- '"TextStyle" flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
- '"ScaleSystem" 0 for world, 1 for paper, 2 for device
- '"BrushDrawMode" brush drawing mode as n Integer
- '"PenAlignment" pen alignment as a String
- '"HatchCross" hatch cross as an Integer
- '"Layer" layer id as an Integer
- '"Info" info string as a String
- '"TextFont" text font as a String
- '"TextFormat" 0 for left justify, 1 for center, 2 for right justify
- '"TextSize" text size as a Double
- '
- 'Return Value
- 'Value of property requested.
- '
- 'AVAILABLE PROPERTIES: VALUE RETURNED:
- '"PenColor" (Long)
- '"PenWidth" (Double)
- '"PenScale" (Double)
- '"PenStyle" (Integer)
- '"BrushColor" (Long)
- '"BrushScale" (Double)
- '"BrushAngle" (Double)
- '"BrushStyle" (Double)
- '"TextStyle" (Integer)
- '"ScaleSystem" (Integer)
- '"BrushDrawMode" (Integer)
- '"PenAlignment" (String)
- '"HatchCross" (Integer)
- '"Layer" (Integer)
- '"Info" (String)
- '"TextFont" (String)
- '"TextFormat" (Integer)
- '"TextSize" (Double)
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- 'Declare Function TCWDrawingPropertyGet ( _
- ' ByRef propertyname As String _
- ')As Variant
-
- 'Description
- 'This function will set the property with the specified value.
- '
- 'Input Parameters
- 'String propertyname name of property to modify
- 'Variant value value to set to
- '
- 'AVAILABLE PROPERTIES: DESCRIPTION:
- '"PenColor" pen color as &H00bbggrr or -3 for by layer, -4 for by block
- '"PenWidth" pen width as a Double
- '"PenScale" pen scale as a Double
- '"PenStyle" pen style as a Integer
- '"BrushColor" brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
- '"BrushScale" brush scale as a Double
- '"BrushAngle" brush angle as a Double
- '"BrushStyle" brush style as a Double
- '"TextStyle" flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
- '"ScaleSystem" 0 for world, 1 for paper, 2 for device
- '"BrushDrawMode" brush drawing mode as n Integer
- '"PenAlignment" pen alignment as a String
- '"HatchCross" hatch cross as an Integer
- '"Layer" layer id as an Integer
- '"Info" info string as a String
- '"TextFont" text font as a String
- '"TextFormat" 0 for left justify, 1 for center, 2 for right justify
- '"TextSize" text size as a Double
- '
- 'Return Value
- '0 if no errors. Non-zero if errors. Use TCWLastErrorGet to retrieve error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- 'Declare Function TCWDrawingPropertySet ( _
- ' ByRef propertyname As String, _
- ' ByVal value As Variant _
- ')As Long
-
- 'Section
- 'GRAPHICS - Graphic Functions
-
- 'Description
- 'This function will return the number of graphics in the drawing or it will return
- 'the number of graphics contained in a graphic. If you supply a drawing handle as
- 'the first parameter to the function, the count will be the number of top level
- 'graphics in the drawing. If you supply a graphic handle as the first parameter to
- 'the function, the count will be the number of graphics contained in the graphic.
- 'This function can be used with TCWGraphicAt to cycle through all the graphics in the
- 'drawing or graphic.
- '
- 'Input Parameters
- 'Long handle handle of the drawing or graphic
- '
- 'Return Value
- 'Number of graphics in the drawing or graphic as a Long.
- '
- 'See Also
- 'TCWGraphicAt
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicCount lib "TCAPI40" ( _
- ByVal d As Long _
- ) As Long
-
- 'Description
- 'This function will return the handle to the requested graphic. The index
- 'should be a number from 0 to the value-1 returned by TCWGraphicCount. If you
- 'are cycling through the graphics in the drawing, use the drawing handle you
- 'used with TCWGraphicCount. If you are cycling through the graphics within a
- 'graphic, use the graphic handle you used with TCWGraphicCount.
- '
- 'Input Parameters
- 'Long handle handle to a drawing or a graphic
- 'Long index requested graphic index
- '
- 'Return Value
- 'Handle of the graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicAt lib "TCAPI40" ( _
- ByVal d As Long, _
- ByVal index As Long _
- ) As Long
-
- 'Description
- 'This function will add a graphic to the active drawing.
- '
- 'Input Parameters
- 'Long g1 if NULL, add to drawing, otherwise add graphic to this parent graphic
- 'Long g2 graphic to add to drawing
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicAppend lib "TCAPI40" ( _
- ByVal g1 As Long, _
- ByVal g2 As Long _
- ) As Long
-
- 'Description
- 'This function will add the next segment to the multiline that is in
- 'progress.
- '
- 'Input Parameters
- 'Long g graphic to add next point to
- 'Double x0 X coordinate of point
- 'Double y0 Y coordinate of point
- 'Double z0 Z coordinate of point
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWGraphicClose, TCWGraphicVertexAdd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicXYZAdd lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will close the multiline, making the last point the same
- 'as the first point.
- '
- 'Input Parameters
- 'Long g graphic to close
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWGraphicXYZAdd, TCWGraphicVertexAdd
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicClose lib "TCAPI40" ( _
- ByVal g As Long _
- ) As Long
-
- 'Description
- 'This function will add a vertex to a graphic in the active drawing.
- '
- 'Input Parameters
- 'Long g graphic
- 'Long v vertex to add to graphic
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicVertexAdd lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal v As Long _
- ) As Long
-
- 'Description
- 'This function will add a vertex to the specified graphic.
- '
- 'Input Parameters
- 'Long g handle of graphic
- 'Double x0 X coordinate of vertex
- 'Double y0 Y coordinate of vertex
- 'Double z0 Z coordinate of vertex
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexAppend lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will make a new graphic with the same properties as
- 'the specified graphic. The graphic is not added to the drawing. You
- 'must explicitly do this. Use TCWGraphicAppend with the first parameter
- 'NULL to add the graphic to the drawing. use TCWGraphicApend with the
- 'first parameter being the handle of the graphic that will be the
- 'parent of the appended graphic.
- '
- 'Input Parameters
- 'Long g graphic to copy
- '
- 'Return Value
- 'Returns the handle to the new graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicCopy lib "TCAPI40" ( _
- ByVal g As Long _
- ) As Long
-
- 'Description
- 'This function will delete the specified graphic.
- '
- 'Input Parameters
- 'Long g graphic to delete
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicDispose lib "TCAPI40" ( _
- ByVal g As Long _
- ) As Long
-
- 'Description
- 'This function will create a new graphic with the default drawing setting. TurboCAD internal
- 'types available are GK_GRAPHIC = 11 (polyline) and GK_ARC = 2.
- '
- 'If you create your own Smart Object (TurboCAD v4 custom shapes), then supply the appropriate
- 'regen name for the object (use GK_GRAPHIC for the kind).
- '
- 'Input Parameters
- 'Long kind kind of graphic to make
- 'String regenmethod Regen method if external regenerated graphic, use "" if TurboCAD type
- '
- 'Return Value
- 'Returns the handle to the new graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicCreate lib "TCAPI40" ( _
- ByVal kind As Long, _
- ByRef regenmethod As String _
- ) As Long
-
- 'Description
- 'This function will draw the graphic on the drawing.
- '
- 'Input Parameters
- 'Long g handle of graphic
- 'Long mode 0 is normal and 1 is inverted
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicDraw lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal mode As Long _
- ) As Long
-
- 'Description
- 'This function will return the graphic handle from the unique database id.
- '
- 'Input Parameters
- 'Long id unique id of graphic
- '
- 'Return Value
- ' The handle of the graphic. If 0, use TCWLastErrorGet to retrieve error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicHandleFromID lib "TCAPI40" ( _
- ByVal id As Long _
- ) As Long
-
- 'Description
- 'This function will set the graphic's reference point, using the
- 'vertex supplied.
- '
- 'Input Parameters
- 'Long g graphic handle
- 'Long v vertex for new reference point
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicReferencePointSet lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal v As Long _
- ) As Long
-
- 'Description
- 'This function will return the graphic reference point.
- '
- 'Input Parameters
- 'Long g graphic handle
- '
- 'Return Value
- 'The the reference point vertex handle as a long. If 0, use TCWLastErrorGet to
- 'retrieve the error text.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGraphicReferencePointGet lib "TCAPI40" ( _
- ByVal g As Long _
- ) As Long
-
- 'Section
- 'GRAPHICS - Selection Manipulation Functions
-
- 'The following group of functions work on the currently selected graphics in the
- 'drawing. They can be used in conjunction with TCWSelectionCount and TCWSelectionAt
- 'to cycle through all the graphics in the drawing.
-
- 'Description
- 'Will scale the selected graphics in the x, y and z direction. A value of 1.0 in
- 'any parameter will not change the scale.
- '
- 'Input Parameters
- 'Double xscale X scale factor
- 'Double yscale Y scale factor
- 'Double zscale Z scale factor
- 'Double x0 x coordinate of reference point
- 'Double y0 y coordinate of reference point
- 'Double z0 z coordinate of reference point
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSelectionScale lib "TCAPI40" ( _
- ByVal xscale As Double, _
- ByVal yscale As Double, _
- ByVal zscale As Double, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will move the selected graphic to the new coordinates.
- '
- 'Input Parameters
- 'Double dx delta x coordinate to move selected graphic
- 'Double dy delta y coordinate to move selected graphic
- 'Double dz delta z coordinate to move selected graphic
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSelectionMove lib "TCAPI40" ( _
- ByVal dx As Double, _
- ByVal dy As Double, _
- ByVal dz As Double _
- ) As Long
-
- 'Description
- 'This function will rotate the selected graphics by the rotation angle
- 'supplied.
- '
- 'Input Parameters
- 'String axis "X", "Y", or "Z" where "X" means rotate in the Y-Z plane
- 'Double angle rotation angle in radians
- 'Double x0 x coordinate of reference point
- 'Double y0 y coordinate of reference point
- 'Double z0 z coordinate of reference point
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSelectionRotate lib "TCAPI40" ( _
- ByRef axis As String, _
- ByVal angle As Double, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will apply a hatch pattern to the selected graphics.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWCreateHatch lib "TCAPI40" () As Long
-
- 'Description
- 'This function will create a group out of the selected graphics.
- '
- 'Input Parameters
- 'String groupname name of group
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGroupCreate lib "TCAPI40" ( _
- ByRef groupname As String _
- ) As Long
-
- 'Description
- 'This function will explode a selected group or block into its individual
- 'graphics. If the selected graphic is a simple graphic such as a line, the
- 'function has no effect.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWExplode lib "TCAPI40" () As Long
-
- 'Description
- 'This function will move the selected graphics to the front of the drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWBringtoFront lib "TCAPI40" () As Long
-
- 'Description
- 'This function will move the selected graphics to the back of the drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSendtoBack lib "TCAPI40" () As Long
-
- 'Description
- 'This function will align the bottoms of the selected graphics.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Returns the handle of the first selected graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWAlignBottom lib "TCAPI40" () As Long
-
- 'Description
- 'This function will align the tops of the selected graphics.
- '
- 'Input Parameters
- '
- 'Return Value
- 'Returns the handle of the first selected graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWAlignTop lib "TCAPI40" () As Long
-
- 'Description
- 'This function will align the middles of the selected graphics.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Returns the handle of the first selected graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWAlignMiddle lib "TCAPI40" () As Long
-
- 'Description
- 'This function will align the left sides of the selected graphics.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Returns the handle of the first selected graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWAlignLeft lib "TCAPI40" () As Long
-
- 'Description
- 'This function will align the right sides of the selected graphics.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Returns the handle of the first selected graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWAlignRight lib "TCAPI40" () As Long
-
- 'Description
- 'This function will align the centers of the selected graphics.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Returns the handle of the first selected graphic as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWAlignCenter lib "TCAPI40" () As Long
-
- 'Section
- 'GRAPHICS - Get and Set Property Functions
-
- 'Description
- 'This function will return the value of the property that has been
- 'requested. This function is written in Basic because of limitations
- 'within Enable Basic for Variants and DLLs.
- '
- 'Input Parameters
- 'Long graphic graphic to get property from
- 'String propertyname name of property look up
- '
- 'AVAILABLE PROPERTIES: DESCRIPTION:
- '"BrushAngle" brush angle as a Double
- '"BrushColor" brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
- '"BrushDrawMode" brush drawing mode as n Integer
- '"BrushScale" brush scale as a Double
- '"BrushStyle" brush style as a Double
- '"DatabaseID" unique id for graphic
- '"HatchCross" hatch cross as an Integer
- '"Info" info string as a String
- '"Layer" layer id as an Integer
- '"LimitVertices" if true, node-edit cannot insert or delete vertices
- '"PenAlignment" pen alignment as a String
- '"PenColor" pen color as &H00bbggrr or -3 for by layer, -4 for by block
- '"PenScale" pen scale as a Double
- '"PenStyle" pen style as a Integer
- '"PenWidth" pen width as a Double
- '"ScaleSystem" 0 for world, 1 for paper, 2 for device
- '"Selected" selected flag as a Long
- '"TextFont" text font as a String
- '"TextFormat" 0 for left justify, 1 for center, 2 for right justify
- '"TextSize" text size as a Double
- '"TextStyle" flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
- '
- '"Closed" closed flag as a Long (READ ONLY)
- '"Kind" graphic type as a Long (READ ONLY)
- '"RegenMethod" regen method name as a String (READ ONLY)
- '
- 'Return Value
- 'Value of property requested.
- '
- 'AVAILABLE PROPERTIES: VALUE RETURNED:
- '"BrushAngle" (Double)
- '"BrushColor" (Long)
- '"BrushDrawMode" (Integer)
- '"BrushScale" (Double)
- '"BrushStyle" (Double)
- '"DatabaseID" (Long)
- '"HatchCross" (Integer)
- '"Info" (String)
- '"Layer" (Integer)
- '"LimitVertices" (Integer)
- '"PenAlignment" (String)
- '"PenColor" (Long)
- '"PenScale" (Double)
- '"PenStyle" (Integer)
- '"PenWidth" (Double)
- '"ScaleSystem" (Integer)
- '"Selected" -1 if selected, 0 if not (Long)
- '"TextFont" (String)
- '"TextFormat" (Integer)
- '"TextSize" (Double)
- '"TextStyle" (Integer)
- '
- '"Closed" -1 if closed, 0 if not (Long - READ ONLY)
- '"Kind" GK_nnnnn (Long - READ ONLY)
- '"RegenMethod" (String - READ ONLY)
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- 'Declare Function TCWGraphicPropertyGet ( _
- ' ByVal g As Long, _
- ' ByRef propertyname As String _
- ')As Variant
-
-
- 'Description
- 'This function will set the property with the specified value.
- '
- 'Input Parameters
- 'Long graphic graphic to set property for
- 'String propertyname name of property to modify
- 'Variant value value to set to
- '
- 'AVAILABLE PROPERTIES: VALUE:
- '"BrushAngle" (Double)
- '"BrushColor" &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen (Long)
- '"BrushDrawMode" (Integer)
- '"BrushScale" (Double)
- '"BrushStyle" (Integer)
- '"DatabaseID" (Long)
- '"HatchCross" (Integer)
- '"Info" (String)
- '"Layer" (Integer)
- '"LimitVertices" (Integer)if true, node-edit cannot insert or delete vertices
- '"PenAlignment" (String)
- '"PenColor" &H00bbggrr or -3 for by layer, -4 for by block (Long)
- '"PenWidth" 1.5 (Double)
- '"PenScale" 1 (Double)
- '"PenStyle" (Integer)
- '"ScaleSystem" 0 for world, 1 for paper, 2 for device (Integer)
- '"Selected" 1 to select, 0 to deselect (Integer)
- '"TextStyle" flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps (Integer)
- '"TextFont" (String)
- '"TextFormat" 0 for left justify, 1 for center, 2 for right justify (Integer)
- '"TextSize" (Double)
- '
- 'Return Value
- '0 if no errors. Non-zero if errors. Use TCWLastErrorGet to retrieve error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- 'Declare Function TCWGraphicPropertySet ( _
- ' ByVal graphic As Long, _
- ' ByRef propertyname As String, _
- ' ByVal value As Variant
- ')As Long
-
-
- 'Section
- 'GRAPHICS - Vertex Functions
-
- 'Description
- 'This function will return the number vertices in the specified graphic.
- '
- 'Input Parameters
- 'Long g graphic to count vertices in
- '
- 'Return Value
- 'Number of vertices as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexCount lib "TCAPI40" ( _
- ByVal g As Long _
- ) As Long
-
- 'Description
- 'This function will return the handle to the vertex requested. Valid index
- 'numbers are 0 to the number-1 returned by VertexCount.
- '
- 'Input Parameters
- 'Long g graphic to get vertex from
- 'Long index vertex to return
- '
- 'Return Value
- 'Handle to vertex as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexAt lib "TCAPI40" ( _
- ByVal g As Long, _
- ByVal index As Long _
- ) As Long
-
- 'Description
- 'This function will create a new vertex at the specified coordinates.
- '
- 'Caller is responsible for disposing of this object unless it is added to a graphic.
- '
- 'Input Parameters
- 'Double x0 X coordinate of vertex
- 'Double y0 Y coordinate of vertex
- 'Double z0 Z coordinate of vertex
- '
- 'Return Value
- 'Returns the handle to the new vertex as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexCreate lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will create a new vertex at the coordinates 0,0,0.
- '
- 'Caller is responsible for disposing of this object unless it is added to a graphic.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Returns the handle to the new vertex as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexZero lib "TCAPI40" () As Long
-
- 'Description
- 'This function will create a new vertex that is initialized to the
- 'same coordinates as the vertex specified.
- '
- 'Input Parameters
- 'Long v handle of a vertex to copy
- '
- 'Return Value
- 'Returns the handle to the new vertex as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexCopy lib "TCAPI40" ( _
- ByVal v As Long _
- ) As Long
-
- 'Description
- 'This function will delete the specified vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex to delete
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexDispose lib "TCAPI40" ( _
- ByVal v As Long _
- ) As Long
-
- 'Description
- 'This function will return the X coordinate of a vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- '
- 'Return Value
- ' X coordinate as a Double.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGetX lib "TCAPI40" ( _
- ByVal v As Long _
- ) As Double
-
- 'Description
- 'This function will set the X coordinate of a vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- 'Double x0 coordinate value
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSetX lib "TCAPI40" ( _
- ByVal v As Long, _
- ByVal x0 As Double _
- ) As Long
-
- 'Description
- 'This function will return the Y coordinate of a vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- '
- 'Return Value
- 'Y coordinate as a Double.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGetY lib "TCAPI40" ( _
- ByVal v As Long _
- ) As Double
-
- 'Description
- 'This function will set the Y coordinate of a vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- 'Double y0 coordinate value
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSetY lib "TCAPI40" ( _
- ByVal v As Long, _
- ByVal y0 As Double _
- ) As Long
-
- 'Description
- 'This function will return the Z coordinate of a vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- '
- 'Return Value
- 'Z coordinate as a Double.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGetZ lib "TCAPI40" ( _
- ByVal v As Long _
- ) As Double
-
- 'Description
- 'This function will set the Z coordinate of a vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- 'Double z0 coordinate value
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSetZ lib "TCAPI40" ( _
- ByVal v As Long, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will set the X and Y coordinates of a vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- 'Double x0 x coordinate value
- 'Double y0 y coordinate value
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSetXY lib "TCAPI40" ( _
- ByVal v As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double _
- ) As Long
-
- 'Description
- 'This function will set the X, Y and Z coordinates of a vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- 'Double x0 x coordinate value
- 'Double y0 y coordinate value
- 'Double z0 z coordinate value
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWSetXYZ lib "TCAPI40" ( _
- ByVal v As Long, _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double _
- ) As Long
-
- 'Description
- 'This function will set the state for the pen. Sets the up or down
- 'state of the pen at the specified vertex.
- '
- 'Input Parameters
- 'Long v handle of a vertex
- 'Long state TRUE if pen should be down
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWPenDown lib "TCAPI40" ( _
- ByVal v As Long, _
- ByVal state As Long _
- ) As Long
-
- 'Section
- 'VIEW - Functions
-
- 'Description
- 'This function will activate the specified view.
- '
- 'Input Parameters
- 'Long index view number
- '
- 'Return Value
- 'Returns the handle to the view as a Long.
- '
- 'See Also
- 'TCWViewCount, TCWViewActive
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewAt lib "TCAPI40" ( _
- ByVal index As Long _
- ) As Long
-
- 'Description
- 'This function will return the number of views that are open.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Count of the number of open views as a Long.
- '
- 'See Also
- 'TCWViewAt, TCWViewActive
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewCount lib "TCAPI40" () As Long
-
- 'Description
- 'This function will return the handle to the active view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Handle to view as a Long.
- '
- 'See Also
- 'TCWViewAt, TCWViewCount
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewActive lib "TCAPI40" () As Long
-
- 'Description
- 'This function will force a redraw on the current view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewRedraw lib "TCAPI40" () As Long
-
- 'Description
- 'This function will flush any remaining paint messages to the view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewUpdateWindow lib "TCAPI40" () As Long
-
- 'Description
- 'This function will zoom the current view to full view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewZoom lib "TCAPI40" () As Long
-
- 'Description
- 'This function will zoom in the current view. The amount of zoom is
- 'determined by the zoom factor setting on the Options|Program Setup|General
- 'property page.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewZoomIn lib "TCAPI40" () As Long
-
- 'Description
- 'This function will zoom out the current view. The amount of zoom is
- 'determined by the zoom factor setting on the Options|Program Setup|General
- 'property page.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewZoomOut lib "TCAPI40" () As Long
-
- 'Description
- 'This function will zoom to the printed page size.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewZoomPage lib "TCAPI40" () As Long
-
- 'Description
- 'This function will zoom to a view that contains all of the objects in the drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewZoomExtents lib "TCAPI40" () As Long
-
- 'Description
- 'This function will zoom to a view that is bounded by the rectangle points
- 'specified.
- '
- 'Input Parameters
- 'Double x0 X coordinate of top left corner of rectangle
- 'Double y0 Y coordinate of top left corner of rectangle
- 'Double z0 Z coordinate of top left corner of rectangle
- 'Double x1 X coordinate of lower right corner of rectangle
- 'Double y1 Y coordinate of lower right corner of rectangle
- 'Double z1 Z coordinate of lower right corner of rectangle
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWViewZoomWindow lib "TCAPI40" ( _
- ByVal x0 As Double, _
- ByVal y0 As Double, _
- ByVal z0 As Double, _
- ByVal x1 As Double, _
- ByVal y1 As Double, _
- ByVal z1 As Double _
- ) As Long
-
- 'Description
- 'This function will return x coordinate which represents the bottom left
- 'corner of the view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'x coordinate as a Double.
- '
- 'See Also
- 'TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
- 'TCWViewExtentsGetZ2
- '
- 'Coding Example
- 'Find center of screen
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- '
- ' ' Create the empty circle graphic
- ' g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)
- '
- 'Declaration
- Declare Function TCWViewExtentsGetX1 lib "TCAPI40" () As Double
-
- 'Description
- 'This function will return y coordinate which represents the bottom left
- 'corner of the view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'y coordinate as a Double.
- '
- 'See Also
- 'TCWViewExtentsGetX1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
- 'TCWViewExtentsGetZ2
- '
- 'Coding Example
- 'Find center of screen
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- '
- ' ' Create the empty circle graphic
- ' g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)
- '
- 'Declaration
- Declare Function TCWViewExtentsGetY1 lib "TCAPI40" () As Double
-
- 'Description
- 'This function will return z coordinate which represents the bottom left
- 'corner of the view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'z coordinate as a Double.
- '
- 'See Also
- 'TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
- 'TCWViewExtentsGetZ2
- '
- 'Coding Example
- 'Find center of screen
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- '
- ' ' Create the empty circle graphic
- ' g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)
- '
- 'Declaration
- Declare Function TCWViewExtentsGetZ1 lib "TCAPI40" () As Double
-
- 'Description
- 'This function will return x coordinate which represents the top right
- 'corner of the view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'x coordinate as a Double.
- '
- 'See Also
- 'TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetY2,
- 'TCWViewExtentsGetZ2
- '
- 'Coding Example
- 'Find center of screen
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- '
- ' ' Create the empty circle graphic
- ' g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)
- '
- 'Declaration
- Declare Function TCWViewExtentsGetX2 lib "TCAPI40" () As Double
-
- 'Description
- 'This function will return y coordinate which represents the top right
- 'corner of the view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'y coordinate as a Double.
- '
- 'See Also
- 'TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2,
- 'TCWViewExtentsGetZ2
- '
- 'Coding Example
- 'Find center of screen
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- '
- ' ' Create the empty circle graphic
- ' g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)
- '
- 'Declaration
- Declare Function TCWViewExtentsGetY2 lib "TCAPI40" () As Double
-
- 'Description
- 'This function will return z coordinate which represents the top right
- 'corner of the view.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'z coordinate as a Double.
- '
- 'See Also
- 'TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2,
- 'TCWViewExtentsGetY2
- '
- 'Coding Example
- 'Find center of screen
- ' xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
- ' yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
- '
- ' ' Create the empty circle graphic
- ' g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)
- '
- 'Declaration
- Declare Function TCWViewExtentsGetZ2 lib "TCAPI40" () As Double
-
- 'Section
- 'LAYERS - Management Functions
-
- 'Description
- 'This function will return the number of layers in the active drawing.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Count of the number of layers as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLayersCount lib "TCAPI40" () As Long
-
- 'Description
- 'This function will return the layer in the active drawing, requested by the index.
- '
- 'Input Parameters
- 'None
- '
- 'Return Value
- 'Handle to the layer as a Long.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLayersAt lib "TCAPI40" ( _
- ByVal Index As Long _
- ) As Long
-
- 'Description
- 'This function will create a new layer in the active drawing. If the layer
- 'already exits, the settings are overwritten.
- '
- 'Input Parameters
- 'String lName name of layer
- 'Integer visible TRUE if visible
- 'Integer frozen TRUE if graphics on layer cannot be edited or selected
- 'Integer ReadOnly TRUE if graphics on layer cannot be edited
- 'Long lColor color as &H00bbggrr
- 'Long lLineStyle line style
- '
- 'Return Value
- 'Layer ID or 0 if layer could not be created. Use TCWLastErrorGet to
- 'retrieve error string.
- '
- 'See Also
- 'TCWLayerDispose
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLayerCreate lib "TCAPI40" ( _
- ByRef lName As String, _
- ByVal visible As Long, _
- ByVal frozen As Long, _
- ByVal readonly As Long, _
- ByVal lColor As Long, _
- ByVal lLineStyle As Long _
- ) As Long
-
- 'Description
- 'This function will delete the layer in the active drawing, requested by the index.
- '
- 'Input Parameters
- 'Long Index layer to delete
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWLayerDispose lib "TCAPI40" ( _
- ByVal Index As Long _
- ) As Long
-
- 'Section
- 'LAYERS - Get and Set Property Functions
-
- 'Description
- 'This function will return the value of the property that has been
- 'requested. This mechanism is being used to get around Enable 3.0
- 'non-support for Variants in DLLs.
- '
- 'Input Parameters
- 'Long layer layer id returned from LayerAt
- 'String propertyname name of property look up
- '
- 'AVAILABLE PROPERTIES: DESCRIPTION:
- '"Color" layer color
- '"Frozen" graphics on layer are non editable and non selectable
- '"LineStyle" layer line style
- '"Name" layer name
- '"Readonly" graphics on layer are read only
- '"Visible" is layer visible in drawing
- '
- 'Return Value
- 'Value of property requested
- '
- 'AVAILABLE PROPERTIES: VALUE RETURNED:
- '"Color" &H00bbggrr as a Long
- '"Frozen" -1 if frozen, 0 if not
- '"LineStyle" layer line style as a Long
- '"Name" layer name as a String
- '"Readonly" -1 if read only, 0 if not
- '"Visible" -1 if visible, 0 if not
- '
- 'See Also
- '
- 'Coding Example
- 'Dim dActive As Long
- 'Dim count As Long
- 'Dim i As Long
- 'Dim LayerID As Long
- 'Dim LayVar As String
- 'Dim Result As Variant
- 'Sub Main
- ' LayVar = "c:\imsi\tcw40\Samples\mouse.tcw"
- ' TCWDrawingOpen "c:\imsi\tcw40\Samples\mouse.tcw"
- '
- ' count = TCWLayersCount()
- ' MsgBox count
- ' i = 1
- ' LayVar = "Name"
- ' Do While (i <> count)
- ' LayerID = TCWLayersAt(i)
- ' Result = TCWLayerPropertyGet(LayerID, LayVar)
- ' MsgBox Result
- ' i = i + 1
- ' Loop
- ' MsgBox "Finished"
- '
- 'End Sub
- '
- 'Declaration
- 'Declare Function TCWLayerPropertyGet ( _
- ' ByVal layer As Long, _
- ' ByRef propertyname As String _
- ')As Variant
-
- 'Description
- 'This function will set the property with the specified value.
- '
- 'Input Parameters
- 'Long layer layer id
- 'String propertyname name of property to modify
- 'Variant value value to set to
- '
- 'AVAILABLE PROPERTIES: VALUES:
- '"Color" &H00bbggrr
- '"Frozen" 1 to set frozen, 0 to unset
- '"Linestyle" Long
- '"Name" String
- '"Readonly" 1 to set readonly, 0 to unset
- '"Visible" 1 to set visible, 0 to unset
- '
- 'Return Value
- '0 if no errors. Non-zero if errors. Use TCWLastErrorGet to retrieve error string.
- '
- 'See Also
- '
- 'Coding Example
- '
- 'Declaration
- 'Declare Function TCWLayerPropertySet ( _
- ' ByVal layer As Long, _
- ' ByRef propertyname As String, _
- ' ByVal value As Variant
- ')As Long
-
-
-
- 'Section
- 'FILE I/O - Functions
-
- 'Description
- 'This function will open a text file for input.
- '
- 'Input Parameters
- 'String filename name of file to open for reading.
- '
- 'Return Value
- 'Handle to the file as a Long. If return value is 0, use TCWLastErrorGet to
- 'retrieve error string.
- '
- 'See Also
- 'TCWCloseInput, TCWReadInput, TCWReadInputToken
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWOpenInput lib "TCAPI40" ( _
- ByRef filename As String _
- ) As Long
-
- 'Description
- 'This function reads characters from the input file (fd) until it reaches a:
- 'space, next line, of eof or the max number of characters has been read (256).
- '
- 'Input Parameters
- 'Long fd file descriptor returned by TCWOpenInput
- 'String strtext buffer for data to be read into
- '
- 'Return Value
- '0 if no errors
- '-1 if EOF seen
- 'Non-zero (not -1) if errors. Use TCWLastErrorGet to retrieve error string.
- '
- 'See Also
- 'TCWOpenInput, TCWCloseInput, TCWReadInput
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWReadInputToken lib "TCAPI40" ( _
- ByVal fd As Long, _
- ByRef bstrtext As String _
- ) As Long
-
- 'Description
- 'This function reads the entire line from the input file (fd) into the buffer pbstrBuffer.
- 'The line separator character is '\n'. '\r' is ignored.
- '
- 'Input Parameters
- 'Long fd file descriptor returned by TCWOpenInput
- 'String strtext buffer for data to be read into
- '
- 'Return Value
- '0 if no errors
- '-1 if EOF seen
- 'Non-zero (not -1) if errors. Use TCWLastErrorGet to retrieve error string.
- '
- 'See Also
- 'TCWCloseInput, TCWOpenInput, TCWReadInputToken
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWReadInput lib "TCAPI40" ( _
- ByVal fd As Long, _
- ByRef bstrtext As String _
- ) As Long
-
- 'Description
- 'This function closes the input file.
- '
- 'Input Parameters
- 'Long fd file descriptor returned by TCWOpenInput
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWOpenInput, TCWReadInput, TCWReadInputToken
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWCloseInput lib "TCAPI40" ( _
- ByVal fd As Long _
- ) As Long
-
- 'Description
- 'This function will open a text file for output.
- '
- 'Input Parameters
- 'String filename name of file to open for writing.
- '
- 'Return Value
- 'Handle to the file as a Long. If return value is 0, use TCWLastErrorGet to
- 'retrieve error string.
- '
- 'See Also
- 'TCWCloseOutput, TCWWriteOutput
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWOpenOutput lib "TCAPI40" ( _
- ByRef filename As String _
- ) As Long
-
- 'Description
- 'This function writes the buffer bstrBuffer to the file (fd).
- '
- 'Input Parameters
- 'Long fd file descriptor returned by TCWOpenOutput
- 'String strtext buffer for data to be read into
- '
- 'Note that max number of bytes you can write is 0xFFFE (65534).
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWCloseOutput, TCWOpenOutput
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWWriteOutput lib "TCAPI40" ( _
- ByVal fd As Long, _
- ByRef bstrBuffer As String _
- ) As Long
-
- 'Description
- 'This function closes the output file.
- '
- 'Input Parameters
- 'Long fd file descriptor returned by TCWOpenOutput
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWOpenOutput, TCWWriteOutput
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWCloseOutput lib "TCAPI40" ( _
- ByVal fd As Long _
- ) As Long
-
- 'Section
- 'SCREEN - Mouse to Point Functions
-
- 'Description
- 'This function will set the vertex to the value of the next mouse pick in the
- 'active viewport. The user should use the left mouse button. A value will not be
- 'returned until the mouse button is released.
- '
- 'Input Parameters
- 'Long v handle to a vertex
- 'String prompt prompt for user
- 'Long g handle of a graphic to drag (or NULL)
- 'Long vd reference to a vertex in the drag graphic (or NULL)
- 'Long os snap modes which give "magnetic: functionality
- 'Long cursor 1 for arrow, 2 for cross, 3 for ibeam
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- ' TCWVertexFindVertex, TCWVertexFindGraphic
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWGetPoint lib "TCAPI40" ( _
- ByVal v As Long, _
- ByVal Prompt As String, _
- ByVal gd As Long, _
- ByVal vd As Long, _
- ByVal osmode As Long, _
- ByVal cursor As Long _
- ) As Long
-
- 'Description
- 'This function will update the supplied vertex's X, Y, and Z coordinates with the
- 'X, Y, and Z coordinates of the closest vertex based on the snap mode used.
- '
- 'Input Parameters
- 'Long v handle to a vertex
- 'Long os snap modes which are active combination of the following values:
- '
- '. . SNAP_NEARESTPOINT 0x0008
- '. . SNAP_MIDPOINT 0x0020
- '. . SNAP_CENTER 0x0040
- '. . SNAP_QUADRANTPOINT 0x0080
- '. . SNAP_ANYPOINT 0x00FC
- '. . SNAP_NEARESTENTITY 0x0100 (overrides other snaps)
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string. Input parameter is updated to reflect closest vertex.
- '
- 'See Also
- 'TCWVertexFindGraphic
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexFindVertex lib "TCAPI40" ( _
- ByVal v As Long, _
- ByVal osmode As Long _
- ) As Long
-
- 'Description
- 'This function with return the handle to the graphic that is closest to the
- 'supplied vertex.
- '
- 'Input Parameters
- 'Long v handle to a vertex
- '
- 'Return Value
- '0 if no errors. Non-zero if an error occurred. Use TCWLastErrorGet to retrieve
- 'error string.
- '
- 'See Also
- 'TCWVertexFindVertex
- '
- 'Coding Example
- '
- 'Declaration
- Declare Function TCWVertexFindGraphic lib "TCAPI40" ( _
- ByVal v As Long _
- ) As Long
-
-